<?php 
$options_adword = new leeproOptions();
		$options = $options_adword->getOptions();
if (have_posts()) : while (have_posts()) : the_post(); update_post_caches($posts); 		
	$rand_img = mt_rand(1,5);
	
	?>
	<div class="wrapper bot-indent">
		<div class="featured-thumbnail">
			<div class="img-wrap">
				<a href="<?php the_permalink()?>">
					<?php 
						if(has_post_thumbnail()) {
							the_post_thumbnail();
						} 
						else { ?>
							<img class="personal" src="<?php echo bloginfo('template_directory');?>/lib/img/img_not_found.jpg" alt="<?php the_title();?>" />
							
						<?php } ?>
				</a>
			</div>
		</div>      
		<div class="post-content extra-wrap">
			<div class="excerpt">
				<header>	
					<h3><a rel="bookmark" title="<?php the_title();?>" href="<?php the_permalink();?>"><?php the_title();?></a></h3>
					<div class="post-meta">
				
						Posted by &nbsp;<?php the_author_posts_link(); ?>&nbsp;
						on &nbsp;<?php the_time(__('M d, Y', 'leepro_datienrestaurant')) ?> &nbsp;|&nbsp; 
						<?php comments_popup_link(__('No comments', 'leepro_datienrestaurant'), __('1 comment', 'leepro_datienrestaurant'), __('% comments', 'leepro_datienrestaurant'), '', __('Comments off', 'leepro_datienrestaurant')); ?>
						<?php edit_post_link(__('Edit', 'leepro_travel'), '&nbsp;|&nbsp;<span class="editpost">', '</span>'); ?>
					
					</div><!--.post-meta-->
				</header>
				<div class="the_excerpt">
				<?php the_excerpt()?>
				<div class="a_readmore"><a class="view_more" href="<?php the_permalink()?>">Xem tiếp...</a></div>
				<div class="under li_under">
					<?php if ($options['categories']) : ?><span class="categories"><?php _e('Categories: ', 'leepro_travel'); ?></span><span><?php the_category(', '); ?></span><?php endif; ?>
					<?php if ($options['tags']) : ?><span class="tags"><?php _e('Tags: ', 'leepro_travel'); ?></span><span><?php the_tags('', ', ', ''); ?></span><?php endif; ?>
				</div>
				</div>
			</div>

		</div>
	</div>
	
<?php  endwhile;$rand_img = 1; else : ?>
	<div class="errorbox">
		<?php _e('Sorry, no posts matched your criteria.', 'leepro_datienrestaurant'); ?>
		<?php get_search_form();?>
		<?php if(function_exists('wp_custom_fields_search')) 
			wp_custom_fields_search(); ?>
	</div>
<?php endif; ?>